home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Univers Mac Interactif 42
/
Univers Mac Interactif - Issue 42.iso
/
Internet
/
MacHTTP 2.0
/
MacHTTP Software & Docs
/
Tutorials
/
Examples
/
test.script
< prev
Wrap
Text File
|
1994-11-27
|
2KB
|
37 lines
-- Variables available for use:
-- http_search_args - stuff in the URL after a ?
-- post_args - stuff in the URL after a $
-- method - GET, POST, etc. Used to tell if post_args are valid
-- client_address - IP address or domain name of remote client's host
-- from_user - non-standard. e-mail address of remote user
-- username - authenticated user name
-- password - authenticated password
-- server_name - name or IP address of this server
-- server_port - TCP/IP port number being used by this server
-- script_name - URL name of this script
-- referer - the URL of the page referencing this document
-- user_agent - the name and version of the WWW client software being used
-- content_type - MIME content type of post_args
set crlf to (ASCII character 13) & (ASCII character 10)
--this builds the normal HTTP header for regular access
set http_10_header to "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf & ¬
"MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf
return http_10_header & "<title>Test SCRIPT</title><h2>Test SCRIPT</h2><u>SCRIPT arguments sent:</u>" & ¬
"<br><b>path:</b> " & path_args & ¬
"<br><b>search:</b> " & http_search_args & ¬
"<br><b>post_args:</b> " & post_args & ¬
"<br><b>method:</b> " & method & ¬
"<br><b>address:</b> " & client_address & ¬
"<br><b>user:</b> " & username & ¬
"<br><b>password:</b> " & password & ¬
"<br><b>from:</b> " & from_user & ¬
"<br><b>server_name:</b> " & server_name & ¬
"<br><b>server_port:</b> " & server_port & ¬
"<br><b>script_name:</b> " & script_name & ¬
"<br><b>referer:</b> " & referer & ¬
"<br><b>user agent:</b> " & user_agent & ¬
"<br><b>content_type:</b> " & content_type & crlf